package com.yowasa.xiuxian.engine.item.lingyao;

import com.yowasa.xiuxian.annoations.Item;
import com.yowasa.xiuxian.engine.item.ItemInterface;
import com.yowasa.xiuxian.entity.bo.user.UserBO;
import com.yowasa.xiuxian.entity.enums.ItemTypeEnum;
import com.yowasa.xiuxian.exception.HandlerException;

@Item(name = "淬骨丹", type = ItemTypeEnum.LING_YAO, price = 10000)
public class CuiGuDan implements ItemInterface {

    @Override
    public String desc() {
        return "力量不满70提高5点力量";
    }

    @Override
    public String effect(UserBO userBO) {
        if (userBO.getUserAttr().getStr() >= 70) {
            throw new HandlerException("你力量已经很优秀了,淬骨丹已经对你没有效果");
        }
        userBO.getUserAttr().setStr(userBO.getUserAttr().getStr() + 5);
        return "你的力量获得了提升";
    }


}
